package listener;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Sender {
	ApplicationContext context = new ClassPathXmlApplicationContext(
			"rabbit-sender-context.xml");
	AmqpTemplate aTemplate = (AmqpTemplate) context.getBean("myTemplate");

	public AmqpTemplate getaTemplate() {
		return aTemplate;
	}

	public void setaTemplate(AmqpTemplate aTemplate) {
		this.aTemplate = aTemplate;
	}

}
